<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{.Title}}</title>
    <style>
        /* 整体页面背景 - 浅蓝色增强氛围 */
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #e6f2ff; /* 浅蓝色背景 */
            color: #333;
        }
        /* 头部区域 - 深蓝主色调 */
        .header {
            background-color: #00529b; /* 深蓝色 */
            color: white;
            text-align: center;
            padding: 18px 20px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        }
        .header h1 {
            margin: 0;
            font-size: 26px;
            font-weight: normal;
        }
        .container {
            width: 90%;
            max-width: 1000px;
            margin: 20px auto;
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
            overflow: hidden;
        }
        .content {
            padding: 25px;
        }
        /* 标题部分 - 绿色强调 */
        .section-title {
            font-size: 20px;
            font-weight: 600;
            color: #2e7d32; /* 深绿色 */
            border-left: 6px solid #4caf50; /* 亮绿色边框 */
            padding-left: 15px;
            margin: 25px 0 15px;
            display: inline-block;
        }
        table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
            background-color: white;
        }
        th, td {
            padding: 12px 15px;
            text-align: left;
            border-bottom: 1px solid #e1e8f0;
        }
        th {
            background-color: #e3f2fd; /* 浅蓝色表头 */
            color: #00529b;
            font-weight: 500;
        }
        tr:hover {
            background-color: #f0f7ff; /* 行悬停浅蓝色 */
        }
        ul {
            list-style: none;
            margin: 20px 0;
            padding-left: 10px;
        }
        ul li {
            margin-bottom: 10px;
            padding-left: 25px;
            position: relative;
        }
        ul li:before {
            content: "•";
            color: #4caf50; /* 绿色列表点 */
            position: absolute;
            left: 0;
            font-size: 20px;
            line-height: 1;
        }
        .control-panel {
            border-top: 1px solid #e1e8f0;
            padding: 20px 0 0;
            margin-top: 25px;
        }
        .form-group {
            margin-bottom: 15px;
            display: flex;
            align-items: center;
        }
        .control-panel label {
            min-width: 100px;
            text-align: right;
            margin-right: 15px;
            color: #333;
        }
        .control-panel input[type="password"] {
            flex: 1;
            padding: 8px 12px;
            border: 1px solid #c5d2e0;
            border-radius: 4px;
            font-size: 14px;
        }
        .control-panel button {
            padding: 8px 18px;
            background-color: #00529b; /* 深蓝色按钮 */
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            transition: background-color 0.2s;
        }
        .control-panel button:hover {
            background-color: #003d7a; /* 深色调按钮悬停效果 */
        }
        .footer {
            text-align: center;
            padding: 15px;
            background-color: #e3f2fd; /* 浅蓝色页脚 */
            color: #555;
            font-size: 14px;
            margin-top: 25px;
        }
        /* 链接样式 - 蓝色为主，悬停变深 */
        a {
            color: #00529b;
            text-decoration: none;
            transition: color 0.2s;
        }
        a:hover {
            color: #003d7a;
            text-decoration: underline;
        }
        /* 绿色状态标签 */
        .status-tag {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 12px;
            margin-left: 5px;
            color: white;
            background-color: #4caf50; /* 绿色状态标签 */
        }
    </style>
</head>
<body>
<div class="header">
    <h1>{{.Title}}</h1>
</div>
<div class="container">
    <div class="content">
        <div class="section-title">
            <h2>{{.ServerName}}</h2>
        </div>
        <p>{{.ServerInfo}} <span class="status-tag">运行中</span></p>

        <div class="section-title">
            <h3>服务器状态</h3>
        </div>
        <table>
            {{range $key, $value := .ServerStats}}
            <tr>
                <td>{{$key}}</td>
                <td>{{$value}}</td>
            </tr>
            {{end}}
        </table>

        <div class="section-title">
            <h3>应用程序</h3>
        </div>
        <ul>
            <li><a href="/docs/">文档</a> - 服务器文档</li>
            <li><a href="/examples/">示例</a> - 示例应用</li>
            <li><a href="/manager/html">管理器</a> - 应用程序管理器</li>
        </ul>

        <div class="control-panel">
            <h3 style="color: #00529b; margin-top: 0;">服务器控制</h3>
            <form action="/restart" method="post">
                <div class="form-group">
                    <label for="password">管理员密码:</label>
                    <input type="password" name="password" id="password" placeholder="输入密码重启服务器">
                    <button type="submit">重启服务器</button>
                </div>
            </form>
            <p>最后更新时间: {{.LastUpdated}} <span class="status-tag">已更新</span></p>
        </div>
    </div>
</div>
<div class="footer">
    <p>Powered by 706 kvm Demo</p>
</div>
</body>
</html>